package hospital.order.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import hospital.model.order.OrderInfo;
import hospital.vo.order.OrderCountQueryVo;
import hospital.vo.order.OrderQueryVo;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * @author
 * @description:
 */

public interface OrderService  extends IService<OrderInfo> {
    @Transactional
    //生成挂号订单
    Long saveOrder(String scheduleId, Long patientId);

    //获取订单详情
    OrderInfo getOrderInfo(String orderId);

    //获取订单列表
    Page<OrderInfo> getPageList(Integer page, Integer limit, Long userId, OrderQueryVo orderQueryVo);
    @Transactional
    //取消预约
    Boolean cancelOrder(Long orderId);

    //监听定时任务的消息 即我是定时任务消费者
    void patientTips();

    //统计预约挂号的数量
    Map<String,Object> getCountMap(OrderCountQueryVo orderCountQueryVo);
}
